import java.io.Serializable;

public class Person implements Serializable {
    //这个版本号的作用：记录当时序列化的信息，在反序列化的时候，
    //能够找到当时序列化的时候类的信息防止类的信息被修改
    private static final long serialVersionUID = -1054457445454l;

    private String name;
    private double salary;
    private char sex;
    private String address;
    private String email;

    public Person(String name, double salary, char sex, String address, String email) {
        this.name = name;
        this.salary = salary;
        this.sex = sex;
        this.address = address;
        this.email = email;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", salary=" + salary +
                ", sex=" + sex +
                ", address='" + address + '\'' +
                ", email='" + email + '\'' +
                '}';
    }
}
